package service.subject;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.common.BaseMapper;
import com.common.BaseService;

import beans.subject.subchapterBean;
import mapper.subject.subchapterMapper;

@Service
@Transactional
public class SubChapterServiceImpl<T> extends BaseService<T>{

	@Autowired
	private subchapterMapper<T> _subchapterMapper;

	@Override
	public BaseMapper<T> getMapper() {
		return _subchapterMapper;
	}

	public void updateSubCount(String id, Integer subcount) {
		_subchapterMapper.updateSubCount(id,subcount);
	}

	public List<subchapterBean> getByDriverAndSub(String drivertype, String subtype) {
		return _subchapterMapper.getByDriverAndSub(drivertype,subtype);
	}

	public List<T> queryByIds(String[] ids) {
		return _subchapterMapper.queryByIds(ids);
	}
}